import { request } from '@pkg/request/src';

export enum Api {
  page = '/order/page',
  companyPlaceOrder = '/busCompany/placeOrder',
  companyOrderRefund = '/busCompany/orderRefund',
}

export const companyPlaceOrder = (params) =>
  request.post(
    {
      url: Api.companyPlaceOrder,
      params: params,
    },
    { errorMessageMode: 'message', successMessageMode: 'success' },
  );

/**
 * 合作企业下单退款
 */
export const companyOrderRefund = (params) =>
  request.post(
    { url: Api.companyOrderRefund, params },
    {
      errorMessageMode: 'message',
      successMessageMode: 'success',
    },
  );
